home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- if exist ASK.EXE goto OK1
- echo This batch program uninstalls PhotoFinish, and must be run
- echo from your PhotoFinish directory. Please change to that
- echo directory first. Then run UNINSTAL.BAT and specify the name
- echo of your Windows directory. Example:
- echo uninstal c:\windows
- goto DONE
-
- :OK1
-
- if not exist %1\win.ini goto NOWIN
- goto OK2
- :NOWIN
- echo This batch program uninstalls PhotoFinish. You must specify
- echo the name of your Windows directory. Example:
- echo uninstal c:\windows
- echo Please try again.
- goto DONE
-
- :OK2
-
- rem run me from different dir, so we can delete the entire directory.
- if %2a==a goto OK3
- goto OK4
- :OK3
- copy uninstal.bat %1 > NUL
- %1\uninstal %1 secret
-
- :OK4
-
- echo ******************************************
- echo * WARNING WARNING WARNING WARNING *
- echo ******************************************
- echo
- echo This batch program uninstalls PhotoFinish.
- echo It erases the ENTIRE PhotoFinish directory, and all product
- echo subdirectories underneath the main PhotoFinish directory.
- echo If you have any images or other files you would like to save,
- echo you must copy them to another location before continuing.
- echo
- echo If you created any additional subdirectories under the main
- echo PhotoFinish directory, or if files or directories are marked
- echo as read-only, the final removal of the PhotoFinish directory
- echo will not succeed. In this event, the product files will have
- echo been deleted, and you just need to manually remove the few
- echo remaining items.
- echo
- ask " Are you sure you want to erase PhotoFinish now?" Yes No
- if ERRORLEVEL 2 goto ABORT
- if ERRORLEVEL 1 goto DOIT
- goto ABORT
-
- :DOIT
- ask " Are you really sure?" Yes No
- if ERRORLEVEL 2 goto ABORT
- if ERRORLEVEL 1 goto DOIT1
- goto ABORT
-
- :DOIT1
- if exist PHOTO.EXE goto DOIT2
- echo
- echo Cannot find file PHOTO.EXE in the current directory.
- goto ABORT
-
- :DOIT2
- if exist y goto DOIT3
- echo
- echo Cannot find file "y" in the current directory.
- goto ABORT
-
- :DOIT3
-
- rem run ask in special mode to create cleanup batch file in windows dir
- ask rd %1 "echo Removing PhotoFinish directory."
-
- if not exist %1\system\browser.dll goto PROGRAM
- del %1\system\browser.dll >NUL
- del %1\system\jpeg_dll.dll >NUL
- del %1\system\zcapdll.dll >NUL
- :PROGRAM
- del images\*.* <y >NUL
- rd images >NUL
- del maps\*.* <y >NUL
- rd maps >NUL
- del palettes\*.* <y >NUL
- rd palettes >NUL
- del photolib\*.* <y >NUL
- rd photolib >NUL
- del textures\*.* <y >NUL
- rd textures >NUL
- del tiles\*.* <y >NUL
- rd tiles >NUL
- del papers\*.* <y >NUL
- rd papers
- del thumnail\*.* <y >NUL
- rd thumnail
- del *.* <y >NUL
-
- echo
- echo PhotoFinish files have been erased.
- rem now remove the product directory
- cd ..
- %1\rdzprod
- goto DONE
-
- :ABORT
- echo Exiting without erasing PhotoFinish.
-
- :DONE
- echo on